package ns.om.domain.dict

/**
 * 工作量
 * @author neo
 * 2012-8-30
 */
class EffortUnit {
	String code;
	String shortCode;
	String name;
	Integer hours;


	static mapping = {
		id name:'code',generator:'assigned'
	}
	
	static constrains = {
		shortCode unique:true
	}
	
	static init ={
		new EffortUnit(code:'Hour',shortCode:'H',name:'人小时',hours:1).save()
		new EffortUnit(code:'Day',shortCode:'D',name:'人天',hours:24).save()
		new EffortUnit(code:'Month',shortCode:'M',name:'人月',hours:24*22).save()
	}

	@Override
	public String toString() {
		return "$name";
	}
}
